using System;

public abstract class ProductEquippableWeapon : Product
{
	public float damage;

	public float fakeDamage;

	public DamageType damageType;

	public virtual float Damage
	{
		get
		{
			if (fakeDamage > 0f)
			{
				return fakeDamage;
			}
			return damage;
		}
	}

	public ProductEquippableWeapon(string id_G, MoneyType priceIng_G, int price_G, bool availableForBuy_G, float sortWeight_G, string texture_G, string nameForFlurry_G, bool isTemporary_G, int tier_G, bool bestPrice_G, bool newProduct_G, string nextProductId_G, string prevProductId_G, string categoryName_G, string subCategoryName_G, RareType rare_G, float damage_G, float fakeDamage_G, DamageType damageType_G)
		: base(id_G, priceIng_G, price_G, availableForBuy_G, sortWeight_G, texture_G, nameForFlurry_G, isTemporary_G, tier_G, bestPrice_G, newProduct_G, nextProductId_G, prevProductId_G, categoryName_G, subCategoryName_G, rare_G)
	{
		damage = damage_G;
		fakeDamage = fakeDamage_G;
		damageType = damageType_G;
	}

	protected override string GetEquipedKey()
	{
		return subCategoryName.ToLower();
	}

	[Obsolete("Вызывать только из MarketController")]
	public override bool Equip()
	{
		MarketController.Instance.SetSelectedWeaponSlot(subCategoryName.ToLower());
		return base.Equip();
	}
}
